<!--
 * @Author: tom
 * @Date: 2022-09-13 11:11:14
 * @LastEditors: 阿航
 * @LastEditTime: 2022-10-31 11:14:25
 * @FilePath: \shop\src\views\wangEdit\index.vue
-->
<template>
  <div id="editor" style="border: 1px solid #ccc"></div>
</template>

<script setup>
import EWangEditor from 'wangeditor'
import {ref, onMounted} from 'vue'

onMounted(() => {
  let editor = new EWangEditor('#editor')
  editor.config.customAlert = (err) => {
    //如果检测到错误的话就打印.
    console.log(err)
  }
  editor.config.onchange = (html) => {
    console.log(html)
  }
  editor.config.placeholder = '请输入内容'

  editor.create()
})
</script>
<style scoped></style>
